Commentary for Avodah Zarah 92:3
אמר רבא ק"ו ומה אתנן שמותר בתלוש להדיוט אסור במחובר לגבוה דכתיב (דברים כג, יט) לא תביא אתנן זונה ומחיר כלב לא שנא תלוש ולא שנא במחובר נעבד שאסור בתלוש להדיוט אינו דין שאסור במחובר לגבוה
Rava said: It can be answered with a kal vehomer argument: if the hire of a harlot is usable for secular purposes when it is an object detached from the ground, but is prohibited for divine worship when it is attached to the ground, as it is written, “You shalt not bring the hire of a harlot, or the wages of a dog” (Deuteronomy 23:19) and it makes no difference whether it is detached from the ground or attached to the ground, a worshipped object, which is prohibited even when it is detached, should it not become prohibited for divine worship w hen it is attached.